<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{padding: 0;margin: 0;font-size: 14px;}
        ul{
            width: 100%;
            height: 40px;

        }   
        li{
            background: pink;
            list-style: none;
            width: 20.9%;
            height: 100%;
            padding: 10px;
            float: left;
            text-align: center;
            border: 1px solid #000;
            line-height: 100%;
        }
        p{
            background-color: #00f;
            width: 900px;
            height: 400px;
            text-align: center;
            line-height: 400px;
            display: none;
        }
        div .appers {
            display: block !important;
        }
        .show {
            background-color: #00f;
        }
        </style>
</head>
<body>
    <ul>
        <li class="show">首页</li>
        <li>订单</li>
        <li>商城</li>
        <li>管理</li>
    </ul>

<div>
    <p class="appers">首页</p>
    <p>订单</p>
    <p>商城</p>
    <p>管理</p>
</div>
<script>
    var oli=document.getElementsByTagName('li')
    var op=document.getElementsByTagName('p')
    for(var i=0;i<oli.length;i++) {
        oli[i].index=i;
        op[i].index=i;
        oli[i].onclick = function(){
            for(var n=0;n<oli.length;n++) {
                op[n].className=''
                oli[n].className=''
            
            }
            console.log()
            op[this.index].className='appers'
            this.className='show'
            console.log()
        }
    }
</script>
</body>
</html>